<template>
  <div>ddds</div>
</template>

<script>
export default {
  created() {
    // let str = decodeURIComponent('https://insmalluat.taikanglife.com/optimise-mall/#/cartoonPage?category=annuity&shareLevel=0&shareTime=1639731388942&agentId=oXLWk5qB5cHVgvl5ZMolfP17Lb7c&fromShare=toFriends&openid=oXLWk5qB5cHVgvl5ZMolfP17Lb7c&userInfo=%7B%22openid%22%3A%22oXLWk5qB5cHVgvl5ZMolfP17Lb7c%22,%22nickname%22%3A%22%E6%B5%85%E5%B7%B7%22,%22sex%22%3A0,%22language%22%3A%22%22,%22city%22%3A%22%22,%22province%22%3A%22%22,%22country%22%3A%22%22,%22headimgurl%22%3A%22https%3A%5C%2F%5C%2Fthirdwx.qlogo.cn%5C%2Fmmopen%5C%2Fvi_32%5C%2FoG8hvlJibwicnanFqaia6udP36LqoiczoylZLPliadic4SJibg2Ffc2Un1452Xuo0KXAnNP7LAKPZ6dPUiamxCTz9CB8cg%5C%2F132%22,%22privilege%22%3A%5B%5D%7D')
    // let a =this.getQueryVariable(str,'userInfo')
    // console.log(JSON.parse(a))
    // console.log(a)
    console.log(this.$route.query.userInfo)
    let b = this.$route.query.userInfo
    console.log(1,b,JSON.parse(b))
  },
  methods: {
    getQueryVariable(url,variable){
          var query = url.split('?')[1].substring(1);
          var vars = query.split("&");
          for (var i=0;i<vars.length;i++) {
                  var pair = vars[i].split("=");
                  if(pair[0] == variable){return pair[1];}
          }
          return(false);
    }
  }
}
</script>

<style>

</style>